The Display


The "window" is where GameMaker Studio 2 displays your game, and, depending on the target device, there are different things that can be done with it, like set it to fullscreen or not (for example). Views, however, govern what you see within that window, and so have another series of functions dedicated to them. The following two sections deal with these two aspects of displaying your game:

  1. The Game Window

However, sometimes it's not enough to get information about the game window and views only, and you really need to know things about the display itself. The following function all give you details about the size and orientation of the display, details about the GUI layer, and information on the mouse:

  1. display_reset
  2. display_get_height
  3. display_get_width
  4. display_get_orientation
  5. display_get_dpi_x
  6. display_get_dpi_y
  7. display_set_gui_size
  8. display_set_gui_maximise
  9. display_get_gui_width
  10. display_get_gui_height
  11. display_set_ui_visibility
  12. display_mouse_get_x
  13. display_mouse_get_y
  14. display_mouse_set
  15. display_set_timing_method
  16. display_get_timing_method
  17. display_set_sleep_margin
  18. display_get_sleep_margin

There are also a few special functions that can be used to save the display, or part of it, to an image file, either as *.png or *.gif:

  1. screen_save
  2. screen_save_part
  3. gif_open
  4. gif_add_surface
  5. gif_save
  6. gif_save_buffer